package com.gtn.exam.title.persistence.dao.impl;

import com.gtn.exam.title.persistence.connection.db.ConnectionFactory;
import com.gtn.exam.title.persistence.dao.PersistanceDAO;

/**
 * The DAO Class which implements {@link PersistanceDAO}
 * 
 * @author Rukshan Silva | 13th August 2014
 * @version 1.0.0
 */
public class PersistanceDAOImpl implements PersistanceDAO {

	private ConnectionFactory connectionFactory;
	
	/**
	 * @param connectionFactory the connectionFactory to set
	 */
	public void setConnectionFactory(ConnectionFactory connectionFactory) {
		this.connectionFactory = connectionFactory;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void save(Object object) {
		
		connectionFactory.save(object);
	}
	
	public void updateLoggedInClient(String sessionId) {
		
		connectionFactory.updateLoggedInClient(sessionId);
	}
}